﻿PuppetPlay = {};

PuppetPlay.Setting = {
    DEBUG_MODE: false,
    TOOL_BAR_HEIGHT: 153,
    HORIZONTAL_TRACK_MARGIN: 230,
    MOVEHANDLE_RADIUS: 26,
    MOVEHANDLE_CENTER_OFFSET_X: 300,
    MOVEHANDLE_CENTER_OFFSET_Y: 92,
    ROTATIONBOARD_RADIUS: 80
};

PuppetPlay.Sources = {};

PuppetPlay.Sources.Group = {
    puppet001: {
        rlegGroup: {
            x: -27,
            y: -259
        },
        llegGroup: {
            x: -9,
            y: -257
        },
        rarmGroup: {
            x: -4,
            y: -378
        },
        larmGroup: {
            x: -26,
            y: -380
        }
        
    },
    puppet002: {
        rlegGroup: {
            x: 9,
            y: -253
        },
        llegGroup: {
            x: 27,
            y: -259
        },
        rarmGroup: {
            x: 25,
            y: -379
        },
        larmGroup: {
            x: 6,
            y: -380
        }

    }
}

PuppetPlay.Sources.ControlPoint = {
    puppet001: {       
        rarmControlPoint: {
            x: 53,
            y: 116
        },
        larmControlPoint: {
            x: 127,
            y: -27
        },
        body: {
            x: 0,
            y: -288
        }
    },
    puppet002: {
        rarmControlPoint: {
            x: -127,
            y: -27
        },
        larmControlPoint: {
            x: -53,
            y: 118
        },
        body: {
            x: 0,
            y: -288
        }

    },
}


PuppetPlay.Sources.Images = {
    controls: {
        wheel: {
            src: "images/controls/wheel.png",
            width: 100,
            height: 100
        },
        walkWheel: {
            src: "images/controls/walk-wheel.png",
            width: 53,
            height: 53
        },
        rotateWheel: {
            src: "images/controls/rotate-wheel.png",
            width: 126,
            height: 50
        }
    },
    background: {
        pot: {
            src: "images/bg-left-pot.png",
            width: 169,
            height: 137
        },
        castle: {
            src: "images/bg-right-castle.png",
            width: 237,
            height: 524
        },
        curtain01: {
            src: "images/bg-top-layer1-repeat.png",
            width: 71,
            height: 91
        },
        curtain02: {
            src: "images/bg-top-layer2.png",
            width: 1366,
            height: 66
        },
        trackHead: {
            src: "images/track_head.png",
            width: 27,
            height: 58
        },
        trackBody: {
            src: "images/track_body.png",
            width: 27,
            height: 58
        },
        trackTail: {
            src: "images/track_tail.png",
            width: 27,
            height: 58
        }
    },
    puppet001: {
        body: {
            src: "images/puppet001-body.png",
            width: 100,
            height: 253,
            x: -61,
            y: -501
        },
        larm: {
            src: "images/puppet001-larm.png",
            width: 192,
            height: 50,
            //x: 19,
            //y: 86
            x: -16,
            y: -35
        },
        rarm: {
            src: "images/puppet001-rarm.png",
            width: 110,
            height: 142,
            //x: 45,
            //y: 107
            x: -12,
            y: -16
        },
        lleg: {
            src: "images/puppet001-lleg.png",
            width: 84,
            height: 203,
            //x: 30,
            //y: 226
            x: -22,
            y: -18
        },
        rleg: {
            src: "images/puppet001-rleg.png",
            width: 67,
            height: 226,
            x: -20,
            y: -18
        } 
    },
    puppet002: {
        body: {
            src: "images/puppet002-body.png",
            width: 100,
            height: 253,
            x: -38,
            y: -501
        },
        rarm: {
            src: "images/puppet002-rarm.png",
            width: 192,
            height: 50,
            //x: 0,
            //y: 87
            x: -174,
            y: -35
        },
        larm: {
            src: "images/puppet002-larm.png",
            width: 110,
            height: 142,
            //x: 56,
            //y: 108
            x: -99,
            y: -13
        },
        rleg: {
            src: "images/puppet002-rleg.png",
            width: 84,
            height: 203,
            //x: 96,
            //y: 228
            x: -62,
            y: -20
        },
        lleg: {
            src: "images/puppet002-lleg.png",
            width: 67,
            height: 226,
            //x: 129,
            //y: 226
            x: -47,
            y: -16
        }
    }
};

PuppetPlay.Sources.Sound = {};